package cn.wmw.xyy.dto;

import cn.wmw.xyy.utils.AssertUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegisterPhoneDto {

    @NotEmpty(message = "手机号不能为空！")
    @Pattern(regexp = AssertUtil.CHINA_PATTERN_PHONE_STR,message = "手机号格式不正确，请验证后再填写！")
    private String mobile;
    @NotEmpty(message = "密码不能为空！")
    @Size(min = 6, max = 16, message = "密码必须在6到16位之间！")
    private String password;
    @NotEmpty(message = "验证码不能为空！")
    @Size(min = 4, max = 6, message = "验证码长度不正确！")
    private String smsCode;
    @NotNull(message = "注册渠道不能为空！")
    private Integer regChannel;
    private String linkCode;
}
